//
//  RTTextFieldViewController.m
//  runtime
//
//  Created by eport on 2020/12/13.
//

#import "RTTextFieldViewController.h"
#import "UITextField+PlaceHolder.h"
#import "UITextView+PlaceHolder.h"

@interface RTTextFieldViewController ()

@end

@implementation RTTextFieldViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"UITextField+PlaceHolder.h";
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self _loadTextField];
    [self _loadTextView];
}

-(void)_loadTextField{
    
    UITextField *textField = [[UITextField alloc]initWithFrame:CGRectMake(30, 100, 200, 50)];
    textField.placeholder = @"请输入用户名哦";
    textField.layer.borderColor = [UIColor lightGrayColor].CGColor;
    textField.layer.borderWidth = 1.0;
    [textField changePlaceHolderTextColor:[UIColor yellowColor]];
    [self.view addSubview:textField];
    
}
-(void)_loadTextView{
    
    UITextView *textview = [[UITextView alloc]initWithFrame:CGRectMake(30, 200, 200, 150)];
    textview.layer.borderColor = [UIColor lightGrayColor].CGColor;
    textview.layer.borderWidth = 1.0;
    [textview SetPlaceHolderTextColor:[UIColor yellowColor] fontSize:17. textContent:@"请填写错误信息"];
    [self.view addSubview:textview];
    
}


@end
